<template>
  <div class="salesContent">
    <div class="header">
      <span class="parentItemNo">销售审核日期</span>
      <el-date-picker
        v-model="date"
        size="mini"
        type="month"
        value-format="yyyy-MM-dd"
      />
      <el-button type="primary" class="salesBtn" size="mini" @click="browse">浏览</el-button>
    </div>
    <iframe :src="url" height="820" scrolling="auto" width="1400" frameborder="1" />
  </div>
</template>

<script>
export default {
  name: 'SalesComparison',
  data() {
    return {
      id: this.$route.params.id,
      date: new Date().toLocaleDateString().split('/').join('-'),
      url: ''
    }
  },
  created() {
    this.browse()
  },
  methods: {
    browse() {
      this.url = `${this.$url}/Default.aspx?Name=YXSHZ_VOL&dockey=${this.date}`
    }
  }
}
</script>

<style scoped lang="scss">
.salesContent{
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  .header {
    margin-bottom: 5px;
    .parentItemNo {
      margin-right: 10px;
      font-size: 13px;
    }
    .salesBtn {
      margin-left: 10px;
    }
  }
}
</style>
